package com.itheima.tanhua.controller;

import com.itheima.tanhua.domain.User;
import com.itheima.tanhua.service.HuanXinService;
import com.itheima.tanhua.vo.HuanXinUserVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Lff
 * @date 2022/3/31
 */
@RestController
@RequestMapping("/huanxin")
public class HuanXinController {
    @Autowired
    private HuanXinService hxService;

    /**
     * 获取环信用户信息
     * @return
     */
    @GetMapping("/user")
    public ResponseEntity getUserHxInfo() {
        HuanXinUserVo result = hxService.findInfo();
        return ResponseEntity.ok(result);
    }
}
